home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
bcsrce2.zip
/
COPYD.BC
< prev
next >
Wrap
Text File
|
1990-02-14
|
3KB
|
103 lines
echo off
let %!a = %1
if %!a# = # goto INPUT
goto TEST1
:TEST1
if not exist %!a goto ERROR
if %!b# = # goto TEST2
let %!b = %2
goto ACT
:TEST2
let %!b = a:*.*
cls
gosub BASICS
locate 8 4
echonolf █ Target █
locate 9 4
echonolf █ Filespec █
locate 10 4
echonolf █ Missing █
locate 15 1
echonolf Input target filespec (Ex: A:*.*):
read %!b
goto ACT
:INPUT
let %!a = *.*
let %!b = a:*.*
cls
gosub BASICS
locate 8 4
echonolf █ Waiting █
locate 9 4
echonolf █ for █
locate 10 4
echonolf █ Input! █
locate 15 1
echonolf Input Source filespec (Ex: ABC*.DOC):\\32
read %!a
let %!z = %!a
string_length %!z
lt %!z 3
if errorlevel 1 goto input
locate 16 1
echonolf Input target filespec (Ex: A:*.*):\\32\\32\\32\\32
read %!b
goto ACT
:SYNTAX
cls
echo.
echo.
echo.
echo SYNTAX---: COPYD [Source] [Destination]
echo USAGE----: Copies file(s) to destination. If file(s) exist in target
echo directory, only new version of same name is copied over.
echo.
echo EXAMPLE--: COPYD *.DOC A:*.*
echo.
echo.
waitkey 2
goto END
:BASICS
echonolf ╔══════════════════════════════════════════════════════════════════════════════╗
echonolf ║ DOS BASICS ║
echonolf ║ ║
echonolf ║ Suggested Filenaming: A-Z, underscore, 0-9, begin with letter avoid dash(-) ║
echonolf ║ Wildcards: Filenams.Ext = File????.Ex? = Fil*.E?t = F*.* = ????N*.??t = *.* ║
echonolf ║ Directory Anatomy: C:\DIR\SUBDIR\SUBDIR2\Filespec.Ext ║
echonolf ║ ╔════════════════╗ │ │ ├──────┘ └─Name of file(s) and Extension ║
echonolf ║ ║ ║ │ │ └─Subdirectories with required "\" divider ║
echonolf ║ ║ ║ │ └─1st Level directory preceded with required ":\" ║
echonolf ║ ║ ║ └─Drive identifier A-E unless Network loaded then A-Z ║
echonolf ╚═╩════════════════╩═══════════════════════════════════════════════════════════╝
return
goto END
:ACT
if not exist %!a goto ERROR
echo.
echo █ Copying files, please wait █
Copyd %!a %!b
goto SYNTAX
:SYNTAX
cls
echo If running COPYD from the DOS PROPMT:
echo.
echo.
echo.
echo.
echo SYNTAX---: COPYD [Source] [Destination]
echo USAGE----: Copies file(s) to destination. If file(s) exist in target
echo directory, only new version of same name is copied over.
echo.
echo EXAMPLE--: COPYD *.DOC A:*.*
echo.
echo.
waitkey 2
goto END
:ERROR
echo Unable to verify existance of Source Filespec %!a
echo.
waitkey 3
goto SYNTAX
:END